﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace SBPweb.RIA.Client.Common.Collections
{

    public class ManagableReadOnlyObservableList<TItem> : ReadOnlyObservableList<TItem>
    {

        #region Constructor logic

        public ManagableReadOnlyObservableList()
            : base(new ObservableList<TItem>())
        {
            ManagableItems = Items as ObservableList<TItem>;
        }

        public ManagableReadOnlyObservableList(IEnumerable<TItem> items)
            : base(new ObservableList<TItem>(new List<TItem>(items)))
        {
            ManagableItems = Items as ObservableList<TItem>;
        }

        public ManagableReadOnlyObservableList(List<TItem> items)
            : base(new ObservableList<TItem>(items))
        {
            ManagableItems = Items as ObservableList<TItem>;
        }

        #endregion

        #region Properties

        public ObservableList<TItem> ManagableItems
        {
            get;
            private set;
        }

        #endregion

    }

}